<?php


namespace app\common\command;


use think\console\Command;
use think\console\input\Argument;
use think\console\Input;
use think\console\Output;

class Config extends Command
{
    protected function configure()
    {
        $this->setName('config')
            ->addArgument('group', Argument::OPTIONAL, "分组名")
            ->setDescription('系统配置生成');
    }

    protected function execute(Input $input, Output $output)
    {
        $group = trim($input->getArgument('group'));

        dbToConfig($group?$group:false);


        $msg = $group?$group.'配置文件生成':'系统所有配置完成';

        $output->writeln($msg);
    }
}